import request from '@/utils/request'

/**新增字典标题 */
export function titleAdd(data) {
    return request({
        url: 'Dict/Create',
        method: 'post',
        data
    })
}
/**获取字典标题列表 */
export function titleList(data) {
    return request({
        url: 'Dict/Query',
        method: 'post',
        data
    })
}
/**获取单个字典标题 */
export function titleOne(id) {
    return request({
        url: 'Dict/Get?id=' + id,
        method: 'get',

    })
}
/**编辑字典标题 */
export function editAdd(data) {
    return request({
        url: 'Dict/Update',
        method: 'post',
        data
    })
}

export function delTitle(id) {
    return request({
        url: 'Dict/Delete?id=' + id,
        method: 'get',

    })
}

export function updateTasks(data) {
    return request({
        url: 'tasks/update',
        method: 'post',
        data
    })
}

export function deleteTasks(id) {
    return request({
        url: 'tasks/delete?id=' + id,
        method: 'get'
    })
}

export function startTasks(id) {
    return request({
        url: 'tasks/start?id=' + id,
        method: 'get'
    })
}

export function stopTasks(id) {
    return request({
        url: 'tasks/stop?id=' + id,
        method: 'get'
    })
}

export default { titleAdd, titleList, titleOne, editAdd, delTitle, updateTasks, deleteTasks, startTasks, stopTasks }
